package com.playfair.thread.utils;

import java.util.Comparator;


public class BruteForceAttackComparator implements
		Comparator<BruteForceAttackResult> {

	@Override
	public int compare(BruteForceAttackResult o1, BruteForceAttackResult o2) {
		if (o1.getFactor() != null)
			return o1.getFactor().compareTo(o2.getFactor());
		else
			return o1.getFactor2().compareTo(o2.getFactor2());
	}

}
